export const WHOLESALE_ORDER_STATUS = [{
  label: '待确认',
  value: 'voucherStatusNotConfirm'
},
{
  label: '待发货',
  value: 'voucherStatusNotDelivery'
},
{
  label: '部分发货',
  value: 'voucherStatusPartialShipment'
},
{
  label: '全部发货',
  value: 'voucherStatusAllShipment'
},
{
  label: '已完成',
  value: ''
},
{
  label: '已撤销',
  value: ''
},
{
  label: '已删除',
  value: ''
}
]
// 去发货弹窗信息
export const TAB_ARR = [{
  lab: '短码',
  val: 1
},
{
  lab: '长码',
  val: 2
}
]
export const DIALOG_TABLE_COLUMNS = [{
  prop: 'deliveryProductCode',
  label: '配送商产品编码',
  width: 200,
  'show-overflow-tooltip': true
}, {
  prop: 'deliveryProductName',
  label: '配送商产品名称',
  width: 200,
  'show-overflow-tooltip': true
}, {
  prop: 'specification',
  label: '规格   型号',
  minWidth: 150,
  'show-overflow-tooltip': true,
  formatter: row => `${row.specification ? row.specification : ''}${row.prodType ? row.prodType : ''}`
}, {
  prop: 'manufacturer',
  label: '生产厂家',
  width: 150,
  'show-overflow-tooltip': true
}, {
  prop: 'registrationNumber',
  label: '注册证号（或备案号）',
  width: 200,
  'show-overflow-tooltip': true
}, {
  prop: 'purchaseNum',
  label: '订单总数量',
  width: 150,
  formatter: row => `${row.purchaseNum ? row.purchaseNum : 0} ${row.unit ? row.unit : ''}`
}, {
  prop: 'sendNum',
  label: '已发货数量',
  width: 150,
  formatter: row => `${row.sendNum ? row.sendNum : 0} ${row.unit ? row.unit : ''}`
},
{
  prop: 'awaitSendNum',
  label: '待发货数量',
  width: 150,
  formatter: row => `${row.awaitSendNum ? row.awaitSendNum : 0} ${row.unit ? row.unit : ''}`
},
{
  prop: 'sweepCount',
  label: '已扫码/待发数量',
  width: 150
}, {
  prop: 'storageCondition',
  label: '储存条件',
  width: 150
}, {
  prop: 'provinceProductCode',
  label: '省平台产品编码',
  minWidth: 160,
  'show-overflow-tooltip': true
}, {
  prop: 'itemCode',
  label: 'M平台产品编码',
  minWidth: 150,
  'show-overflow-tooltip': true
}
]
// 产品大类
export const PRODUCT_CATEGORY = {
  1: '高值',
  2: '低值',
  3: '试剂',
  4: '设备',
  5: '器械'
}
export const DIALOG_TABLE_COLUMNS_HOSPITAL = [
  { prop: 'hospitalProductCode', label: '医院产品编码', width: 150 },
  { prop: 'hospitalProductName', label: '医院产品名称', width: 150 },
  { prop: 'specification', label: '规格', width: 150 },
  { prop: 'productType', label: '型号', width: 150 },
  { prop: 'manufacturer', label: '生产厂家', width: 150 },
  { prop: 'registrationNumber', label: '注册证号（或备案号）', width: 250 },
  { prop: 'category',
    label: '产品大类',
    width: 150,
    formatter: row => {
      return PRODUCT_CATEGORY[row.category]
    } },
  { prop: 'receiveNum', label: '发货数量', width: 150 },
  { prop: 'returnNum', label: '质检异常数量', width: 150 },
  { prop: 'sweepCount', label: '已扫码/待收数量', width: 150 },
  { prop: 'storageCondition', label: '储存条件', width: 150 },
  { prop: 'provinceProductCode', label: '省平台产品编码', width: 150 },
  { prop: 'itemCode', label: 'M平台产品编码', width: 150 }
]
// 发货弹窗物品详情表头
export const ITEM_COLUMNS = [{
  label: '序号',
  type: 'index',
  fixed: 'left',
  width: 56
}, {
  prop: 'udi',
  label: 'UDI',
  fixed: 'left',
  width: 150
}, {
  prop: 'mainCode',
  label: '主条码',
  minWidth: 150
}, {
  prop: 'batchNo',
  label: '批号',
  minWidth: 150
}, {
  prop: 'productDate',
  label: '生产日期',
  minWidth: 200
}, {
  prop: 'expDate',
  label: '有效期',
  minWidth: 200
}, {
  prop: 'serialNo',
  label: '序列号',
  width: 150
}, {
  prop: 'num',
  label: '数量',
  minWidth: 100
}, {
  prop: 'action',
  label: '操作',
  width: 100,
  fixed: 'right'
}]
// 操作类型
export const OPERATE_TEXT = {
  CREATE: '创建',
  AUDIT_REJECTED: '审核驳回',
  EDIT_REJECTED: '驳回编辑',
  AUDITED: '审核通过',
  ORDER_CONFIRMED: '确认接单',
  ORDER_REJECTED: '拒绝接单'
}
export const OPERATE_TYPE = {
  1: 'CREATE',
  2: 'AUDIT_REJECTED',
  3: 'EDIT_REJECTED',
  4: 'AUDITED',
  5: 'ORDER_CONFIRMED',
  6: 'ORDER_REJECTED'
}
// 操作记录表头
export const OPERATE_RECORD_COLUMNS = [{
  width: 60,
  type: 'index',
  label: '序号'
},
{
  minWidth: 120,
  prop: 'operationType',
  label: '操作类型',
  formatter: row => {
    if (!row.operationType && row.operationType !== 0) {
      return ''
    } else {
      return OPERATE_TEXT[OPERATE_TYPE[row.operationType]]
    }
  }
},
{
  minWidth: 120,
  prop: 'operator',
  label: '操作员'
},
{
  width: 180,
  prop: 'createdAt',
  label: '操作日期'
},
{
  minWidth: 120,
  prop: 'remark',
  label: '备注'
}
]
